package com.demo.gulimall.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 属性&属性分组关联
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("pms_attr_attrgroup_relation")
public class AttrAttrgroupRelation implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 属性id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`attr_id`")
	private Long attrId;

	/** 属性分组id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`attr_group_id`")
	private Long attrGroupId;

	/** 属性组内排序 */
	@TableField(value = "`attr_sort`")
	private Integer attrSort;

}
